# 把列表中的元素逐个写入文件
fo = open("txt.txt", "w")
ls = ['book', '23', '202210', '10']
fo.writelines(ls)
fo.close()